#ifndef _MW_CHANNEL_H_INCLUDED_
#define _MW_CHANNEL_H_INCLUDED_

#include <sys/types.h>
#include <unistd.h>
#include <stdint.h>

#include "mw_config.h"
#include "mw_core.h"

typedef struct {
    uint32_t    command;
    pid_t       pid;
    int         slot;
    int         fd;
} mw_channel_t;


int  mw_write_channel(int s, mw_channel_t *ch, size_t size);
int  mw_read_channel(int s, mw_channel_t *ch, size_t size);
void mw_close_channel(int *fd);


#endif /* _MW_CHANNEL_H_INCLUDED_ */
